A solid state drive (“SSD”) is a memory device capable of retaining data persistently without connecting to a power supply. The SSD uses various non-volatile memory devices such as NAND based flash memory to store data or electronic information. With rapidly increasing storage capacity associated with non-volatile memory, SSD becomes more popular for storing non-volatile data for various types of computing systems, such as laptop computers, desktop computers, mobile devices, tablets, servers, routers, network devices, and the like.
A flash memory device is typically organized in multiple blocks wherein each block is further divided into a set of pages. In some examples, each page can be further divided into multiple addressable sectors. In general, a minimum writeable data unit is a page and a minimum erasable unit is a block. Typically, a page can store up to four (4) kilobytes (“KB”). However, with technological advancement in flash memory density, the page size has grown from 4 to 8, 16, or even 32 KB. To recover or reuse storage space that contain garbage data or stale data, such storage space needs to be cleaned, erased, or deleted first before it can be rewritten with new data. When a block, for example, is ready to be erased, it is marked as an erasable block. An erasable block generally contains 256 pages wherein the content of all pages will be deleted when the block is erased.
A drawback associated with erasing content of a block is that a block cannot be erased if one of the pages contains valid data. Before erasing, any valid pages within an erasable block need to be moved or copied to a new block. During a write operation, data, however, is typically written in a random order which generally causes fewer pages getting overwritten. Such overwritten pages become garbage or stale pages overtime. In order to free up or reuse the blocks containing stale data, a garbage collection procedure can typically be used to recover old blocks into new blocks. A problem, however, associated with a conventional garbage collection (“GC”) procedure is that it can consume a substantially amount of writing resources which could impact overall storage performance.